local scheduler = import("framework.scheduler")

local splashScene = class("splashScene",function()    return display.newScene("splashScene") end) 
function splashScene:ctor()
     print("splashScene called")
     self.splash =display.newSprite("splash.png")
     self:addChild(self.splash)
     display.align(self.splash,display.CENTER,display.cx,display.cy)
     transition.fadeOut(self.splash, {delay=0,time = 2,onComplete=handler(self,self.onComplete)})
     display.addSpriteFramesWithFile("fish.plist", "fish.png")  
     display.addSpriteFramesWithFile("sceneQiPao.plist", "sceneQiPao.png")  
     display.addSpriteFramesWithFile("sceneXiaoQiPao.plist", "sceneXiaoQiPao.png")
     display.addSpriteFramesWithFile("dead.plist", "dead.png")
     display.addSpriteFramesWithFile("button/buttons.plist", "button/buttons.png")
     display.addSpriteFramesWithFile("gameover/gameover.plist", "gameover/gameover.png")
     display.addSpriteFramesWithFile("daoju.plist", "daoju.png")
     display.addSpriteFramesWithFile("daoju/rushpaopao.plist", "daoju/rushpaopao.png") 
     display.addSpriteFramesWithFile("daoju/rusheffect.plist","daoju/rusheffect.png")
     display.addSpriteFramesWithFile("daoju/xiaoshi.plist","daoju/xiaoshi.png")
     display.addSpriteFramesWithFile("daoju/shanxian.plist","daoju/shanxian.png")
     display.addSpriteFramesWithFile("daoju/gold.plist","daoju/gold.png")
     display.addSpriteFramesWithFile("daoju/goldeffect.plist","daoju/goldeffect.png")
     display.addSpriteFramesWithFile("shayu.plist","shayu.png")
     print("splashScene end")
end

function splashScene:onComplete()
  local MainScene =require("app.scenes.mainScene.MainScene")
  display.replaceScene(MainScene.new())

 
end

return splashScene